
<template>
  <!--  订单状态-->
  <div v-if="props.param === 'statusCode'">
    <span :class="getStatusStyle(props.scope.statusCode)">{{getStatus(props.scope.statusCode)}}</span>
  </div>
  <!--  退款状态-->
  <div v-if="props.param === 'refundStatusCode'">
    <span :class="getRefundStyle(props.scope.refundStatusCode)">{{getRefundStatus(props.scope.refundStatusCode)}}</span>
  </div>
  <!--  打款状态-->
  <!-- <div v-if="props.param === 'receiveStatusCode'">
    <span :class="getReceiveStyle(props.scope.receiveStatusCode)">{{getReceiveStatus(props.scope.receiveStatusCode)}}</span>
  </div> -->
</template>
<script setup>
import {onMounted, ref, watch} from 'vue'
const props = defineProps({ scope: {default: ''}, param: {default: ''}})
const getStatus = (value) => {
  const statusMap = {
    paying: '待支付',
    payAuditing: '审核中',
    paid: '已付款',
    cancel: '已取消',
    error: '支付异常'
  }
  return statusMap[value]
}
const getRefundStatus = (value) => {
  const refundStatusMap = {
    refunding: '退款中',
    success: '退款成功',
    failed: '退款失败',
    cancel: '已取消'
  }
  return refundStatusMap[value]
}
// const getReceiveStatus = (value) => {
//   const ReceiveStatusMap = {
//     pending: '未付款',
//     done: '已付款',
//     non: '已取消'
//   }
//   return ReceiveStatusMap[value]
// }
const getStatusStyle = (value) => {
  const styleMap = {
    paying: 'labelIcon-danger',
    payAuditing: 'labelIcon-danger',
    paid: 'labelIcon-primary',
    cancel: 'labelIcon-danger',
    error: 'labelIcon-danger'
  }
  return styleMap[value]
}
const getRefundStyle = (value) => {
  const styleMap = {
    refunding: 'labelIcon-danger',
    success: 'labelIcon-primary',
    failed: 'labelIcon-danger',
    cancel: 'labelIcon-danger',
    error: 'labelIcon-danger'
  }
  return styleMap[value]
}
// const getReceiveStyle = (value) => {
//   const styleMap = {
//     pending: 'labelIcon-gary',
//     done: 'labelIcon-primary'
//   }
//   return styleMap[value]
// }


onMounted(() => {
})
</script>

<style scoped>
</style>
